home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / basic / vxbase.zip / VXBASE.TXT < prev    next >
Text File  |  1992-05-05  |  11KB  |  218 lines

  1. ' vxBase Global Constants
  2. ' -----------------------
  3. Global Const BROWSE_CLOSED = -1
  4. Global Const BROWSE_EDIT = -2
  5. Global Const BROWSE_ADD = -3
  6. Global Const BROWSE_DELETE = -4
  7. Global Const BROWSE_ERROR = -5
  8. Global Const BROWSE_USER = -6
  9.  
  10. ' vxBase Color References for user tables
  11. ' ---------------------------------------
  12. Global Const VX_RED = &HFF
  13. Global Const VX_BLUE = &HFF0000
  14. Global Const VX_GRAY = &HC0C0C0
  15.  
  16. ' vxBase Control style modes
  17. ' --------------------------
  18. Global Const VX_RAISE = 0
  19. Global Const VX_RECESS = 1
  20. Global Const VX_CREASE = 2
  21.  
  22. ' vxBase Table Field Types
  23. ' ------------------------
  24. Global Const VX_FIELD = 0
  25. Global Const VX_EXPR = 1
  26.  
  27. ' browse case types
  28. ' -----------------
  29. Global Const VX_UPPER = 0
  30. Global Const VX_LOWER = 1
  31.  
  32. ' vxBase String Return Types
  33. ' --------------------------
  34. Global Const VX_VBSTRING = 0
  35. Global Const VX_ASCIIZ = 1
  36.  
  37. ' vxBase Menu item identifiers
  38. ' ----------------------------
  39. Global Const VX_SEPBAR = 2
  40. Global Const VX_MENUHEAD = 1
  41. Global Const VX_RETURN = 0
  42.  
  43. ' Country (for vxSetDate) and language identifiers
  44. ' ------------------------------------------------
  45. Global Const VX_ENGLISH = 0
  46. Global Const VX_AMERICAN = 0
  47. Global Const VX_ANSI = 1
  48. Global Const VX_BRITISH = 2
  49. Global Const VX_FRENCH = 3
  50. Global Const VX_GERMAN = 4
  51. Global Const VX_ITALIAN = 5
  52. Global Const VX_DUTCH = 6
  53. Global Const VX_SPANISH = 7
  54.  
  55.  
  56. ' vxBase CALLed Sub Procedures
  57. ' ----------------------------
  58. Declare Sub vxBrowse Lib "vxbase.dll" (ByVal Hwnd%, ByVal DbfArea%, ByVal NtxArea%, ByVal EditMode%, ByVal AllowFilter%, ByVal EditMenu%, ByVal StartRec&, ByVal Caption$, RetVal&)
  59. Declare Sub vxBrowseCase Lib "vxbase.dll" (ByVal DefCase As Integer)
  60. Declare Sub vxBrowsePos Lib "vxbase.dll" (ByVal StartX As Integer, ByVal StartY As Integer, ByVal xWidth As Integer, ByVal yHeight As Integer)
  61. Declare Sub vxCtlGrayReset Lib "vxbase.dll" ()
  62. Declare Sub vxCtlGraySet Lib "vxbase.dll" ()
  63. Declare Sub vxCtlLength Lib "vxbase.dll" (Byval FieldName As String)
  64. Declare Sub vxCtlStyle Lib "vxbase.dll" (CtlName As Any, ByVal Mode As Integer)
  65. Declare Sub vxDouble Lib "vxbase.dll" (ByVal FieldName As String, DblAmount As Double)
  66. Declare Sub vxExactOff Lib "vxbase.dll" ()
  67. Declare Sub vxExactOn Lib "vxbase.dll" ()
  68. Declare Sub vxFilter Lib "vxbase.dll" (ByVal FilterString As String)
  69. Declare Sub vxFilterReset Lib "vxbase.dll" ()
  70. Declare Sub vxFormFrame Lib "vxbase.dll" (ByVal Hwnd As Integer)
  71. Declare Sub vxInit Lib "vxbase.dll" ()
  72. Declare Sub vxJoin Lib "vxbase.dll" (ByVal DbfArea As Integer, ByVal NtxArea As Integer, ByVal JoinExpr As String, ByVal KeyType As Integer, ByVal JoinTitle As String)
  73. Declare Sub vxJoinNoAuto Lib "vxbase.dll" ()
  74. Declare Sub vxJoinReset Lib "vxbase.dll" ()
  75. Declare Sub vxMemoEdit Lib "vxbase.dll" (ByVal Hwnd As Integer, ByVal FieldName As String)
  76. Declare Sub vxMenuDeclare Lib "vxbase.dll" (ByVal NumItems As Integer)
  77. Declare Sub vxMenuItem Lib "vxbase.dll" (ByVal MenuIndex As Integer, ByVal MenuLev As Integer, ByVal MenuString As String, ByVal MenuType As Integer)
  78. Declare Sub vxReplDate Lib "vxbase.dll" (ByVal FieldName As String, ByVal DateString As String)
  79. Declare Sub vxReplDouble Lib "vxbase.dll" (ByVal FieldName As String, DblAmount As Double)
  80. Declare Sub vxReplInteger Lib "vxbase.dll" (ByVal FieldName As String, IntAmount As Integer)
  81. Declare Sub vxReplLogical Lib "vxbase.dll" (ByVal FieldName As String, ByVal BoolVal As Integer)
  82. Declare Sub vxReplLong Lib "vxbase.dll" (ByVal FieldName As String, LongInt As Long)
  83. Declare Sub vxReplString Lib "vxbase.dll" (ByVal FieldName As String, ByVal FieldString As String)
  84. Declare Sub vxSetDate Lib "vxbase.dll" (ByVal DateType As Integer)
  85. Declare Sub vxSetErrorCaption Lib "vxbase.dll" (ByVal CaptionString As String)
  86. Declare Sub vxSetLanguage Lib "vxbase.dll" (ByVal LangType As Integer)
  87. Declare Sub vxSetLocks Lib "vxbase.dll" (ByVal OnOrOff As Integer)
  88. Declare Sub vxSetString Lib "vxbase.dll" (ByVal StringType As Integer)
  89. Declare Sub vxSetupPrinter Lib "vxbase.dll" (ByVal Hwnd As Integer)
  90. Declare Sub vxSum Lib "vxbase.dll" (ByVal FieldName As String, DblAmount As Double)
  91. Declare Sub vxTableDeclare Lib "vxbase.dll" (ByVal ColorRef&, BofExpr As Any, EofExpr As Any, ByVal Scope%, ByVal Quick%, ByVal Columns%) 
  92. Declare Sub vxTableField Lib "vxbase.dll" (ByVal ColIndex As Integer, ByVal ColHead As String,  ByVal ColExpr As String, ByVal ColType As Integer)
  93. Declare Sub vxTableReset Lib "vxbase.dll" ()
  94. Declare Sub vxWindowDereg Lib "vxbase.dll" (ByVal Hwnd As Integer)
  95.  
  96.  
  97. ' vxBase Functions
  98. ' ----------------
  99. Declare Function vxAppendBlank Lib "vxbase.dll" () As Integer 
  100. Declare Function vxAppendFrom Lib "vxbase.dll" (ByVal FromFile As String) As Integer
  101. Declare Function vxAreaDbf Lib "vxbase.dll" (ByVal DbfName As String) As Integer
  102. Declare Function vxAreaNtx Lib "vxbase.dll" (ByVal NtxName As String) As Integer
  103. Declare Function vxBof Lib "vxbase.dll" () As Integer 
  104. Declare Function vxBottom Lib "vxbase.dll" () As Integer 
  105. Declare Function vxChar Lib "vxbase.dll" (ByVal FieldName As String) As String
  106. Declare Function vxClose Lib "vxbase.dll" () As Integer 
  107. Declare Function vxCloseAll Lib "vxbase.dll" () As Integer
  108. Declare Function vxCloseNtx Lib "vxbase.dll" (ByVal NtxArea As Integer) As Integer
  109. Declare Function vxCopy Lib "vxbase.dll" (ByVal NewDbfName As String) As Integer
  110. Declare Function vxCopyStruc Lib "vxbase.dll" (ByVal NewDbfName As String) As Integer
  111. Declare Function vxCreateNtx Lib "vxbase.dll" (ByVal NewNtxName As String, ByVal NtxExpr As String) As Integer
  112. Declare Function vxDateFormat Lib "vxbase.dll" (ByVal DateField As String) As String
  113. Declare Function vxDateString Lib "vxbase.dll" (ByVal DateField As String, ByVal DateType As Integer) As String
  114. Declare Function vxDbfDate Lib "vxbase.dll" () As String
  115. Declare Function vxDbfName Lib "vxbase.dll" () As String
  116. Declare Function vxDeallocate Lib "vxbase.dll" () As Integer
  117. Declare Function vxDecimals Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  118. Declare Function vxDeleted Lib "vxbase.dll" () As Integer
  119. Declare Function vxDeleteRange Lib "vxbase.dll" (ByVal StartRec As Long, ByVal EndRec As Long) As Integer
  120. Declare Function vxDeleteRec Lib "vxbase.dll" () As Integer
  121. Declare Function vxDescend Lib "vxbase.dll" (ByVal KeyString As String) As String
  122. Declare Function vxEmpty Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  123. Declare Function vxEof Lib "vxbase.dll" () As Integer
  124. Declare Function vxEval Lib "vxbase.dll" (ByVal XBaseExpr As String) As Integer
  125. Declare Function vxEvalDouble Lib "vxbase.dll" (ByVal XBaseExpr As String, DblAmount As Double) As Integer
  126. Declare Function vxEvalLogical Lib "vxbase.dll" (ByVal XBaseExpr As String, ByVal TrueFalse As String) As Integer
  127. Declare Function vxEvalString Lib "vxbase.dll" (ByVal XBaseExpr As String, ByVal StringVal As String) As Integer
  128. Declare Function vxField Lib "vxbase.dll" (ByVal FieldName As String) As String
  129. Declare Function vxFieldCount Lib "vxbase.dll" () As Integer
  130. Declare Function vxFieldName Lib "vxbase.dll" (ByVal FieldNumber As Integer) As String
  131. Declare Function vxFieldSize Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  132. Declare Function vxFieldType Lib "vxbase.dll" (ByVal FieldName As String) As String
  133. Declare Function vxFile Lib "vxbase.dll" (ByVal FileName As String) As Integer
  134. Declare Function vxFound Lib "vxbase.dll" () As Integer
  135. Declare Function vxGo Lib "vxbase.dll" (ByVal RecNum As Long) As Integer
  136. Declare Function vxInteger Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  137. Declare Function vxIsMemo Lib "vxbase.dll" (ByVal MemoFieldName As String) As Integer
  138. Declare Function vxIsRecLocked Lib "vxbase.dll" () As Integer
  139. Declare Function vxLockDbf Lib "vxbase.dll" () As Integer
  140. Declare Function vxLocked Lib "vxbase.dll" () As Integer
  141. Declare Function vxLockRecord Lib "vxbase.dll" () As Integer
  142. Declare Function vxLong Lib "vxbase.dll" (ByVal FieldName As String) As Long
  143. Declare Function vxMemoRead Lib "vxbase.dll" (Byval FieldName As String, ByVal LineWidth As Integer) As String
  144. Declare Function vxNtxDeselect Lib "vxbase.dll" () As Integer
  145. Declare Function vxNtxExpr Lib "vxbase.dll" (ByVal NtxArea As Integer) As String
  146. Declare Function vxNtxName Lib "vxbase.dll" (ByVal NtxArea As Integer) As String
  147. Declare Function vxNumRecs Lib "vxbase.dll" () As Long
  148. Declare Function vxPack Lib "vxbase.dll" (ByVal Hwnd As Integer) As Integer
  149. Declare Function vxRecall Lib "vxbase.dll" () As Integer
  150. Declare Function vxRecNo Lib "vxbase.dll" () As Long
  151. Declare Function vxRecord Lib "vxbase.dll" (RecStruct As Any) As Integer
  152. Declare Function vxRecSize Lib "vxbase.dll" () As Integer
  153. Declare Function vxReindex Lib "vxbase.dll" () As Integer
  154. Declare Function vxReplMemo Lib "vxbase.dll" (ByVal Fieldname As String, ByVal MemoString As String) As Integer
  155. Declare Function vxSeek Lib "vxbase.dll" (ByVal SearchKey As String) As Integer
  156. Declare Function vxSeekSoft Lib "vxbase.dll" (ByVal SearchKey As String) As Integer
  157. Declare Function vxSelectDbf Lib "vxbase.dll" (ByVal DbfArea As Integer) As Integer
  158. Declare Function vxSelectNtx Lib "vxbase.dll" (ByVal NtxArea As Integer) As Integer
  159. Declare Function vxSetHandles Lib "vxbase.dll" (ByVal NumHandles As Integer) As Integer
  160. Declare Function vxSkip Lib "vxbase.dll" (ByVal NumRecords As Long) As Integer
  161. Declare Function vxTestNtx Lib "vxbase.dll" (ByVal NtxArea As Integer) As Integer
  162. Declare Function vxTop Lib "vxbase.dll" () As Integer 
  163. Declare Function vxTrue Lib "vxbase.dll" (ByVal FieldName As String) As Integer
  164. Declare Function vxUnlock Lib "vxbase.dll" () As Integer 
  165. Declare Function vxUseDbf Lib "vxbase.dll" (ByVal DbfName As String) As Integer
  166. Declare Function vxUseDbfRO Lib "vxbase.dll" (ByVal DbfName As String) As Integer
  167. Declare Function vxUseNtx Lib "vxbase.dll" (ByVal NtxName As String) As Integer
  168. Declare Function vxWrite Lib "vxbase.dll" () As Integer 
  169. Declare Function vxWriteHdr Lib "vxbase.dll" () As Integer 
  170. Declare Function vxZap Lib "vxbase.dll" () As Integer 
  171.  
  172.  
  173. ' ---------------------------------------
  174. ' File structure data type. Add more
  175. ' elements or delete unnecessary elements
  176. ' as required by the largest dbf creation
  177. ' in your application
  178. ' ---------------------------------------
  179.  
  180. Type FileStruc
  181.    Fld01 As String * 16
  182.    Fld02 As String * 16
  183.    Fld03 As String * 16
  184.    Fld04 As String * 16
  185.    Fld05 As String * 16
  186.    Fld06 As String * 16
  187.    Fld07 As String * 16
  188.    Fld08 As String * 16
  189.    Fld09 As String * 16
  190.    Fld10 As String * 16
  191.    Fld11 As String * 16
  192.    Fld12 As String * 16
  193.    Fld13 As String * 16
  194.    Fld14 As String * 16
  195.    Fld15 As String * 16
  196.    Fld16 As String * 16
  197.    Fld17 As String * 16
  198.    Fld18 As String * 16
  199.    Fld19 As String * 16
  200.    Fld20 As String * 16
  201.    Fld21 As String * 16
  202.    Fld22 As String * 16
  203.    Fld23 As String * 16
  204.    Fld24 As String * 16
  205.    Fld25 As String * 16
  206.    Fld26 As String * 16
  207.    Fld27 As String * 16
  208.    Fld28 As String * 16
  209.    Fld29 As String * 16
  210.    Fld30 As String * 16
  211.    Fld31 As String * 16
  212.    Fld32 As String * 16
  213. End Type
  214.  
  215. ' declare functions that use FileStruc type
  216. ' -----------------------------------------
  217. Declare Function vxCreateDbf Lib "vxbase.dll" (ByVal NewDbfName As String, ByVal NumFields As Integer, FStructure as FileStruc) As Integer
  218.